import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'

import App from './App.vue'
import router from './router'
import i18n from './locales'
import { ThemeManager } from './config/theme'
import { AccessibilityManager } from './config/accessibility'
import { setupGlobalErrorHandler } from './utils/errorHandler'
import { performanceMonitor } from './utils/performance'

const app = createApp(App)

// 初始化主题
const themeManager = ThemeManager.getInstance()
themeManager.initTheme()

// 初始化无障碍访问
const accessibilityManager = AccessibilityManager.getInstance()
accessibilityManager.initAccessibility()

// 设置全局错误处理
setupGlobalErrorHandler()

// 初始化性能监控
performanceMonitor.init()

app.use(createPinia())
app.use(router)
app.use(Antd)
app.use(i18n)

app.mount('#app')
